package 基础篇.创建线程;

/**
 * 实现Runnable接口创建线程
 */
public class ImplRunnableDemo implements Runnable{
    private int i;
    @Override
    public void run() {
        for (int i=0;i<100;i++){
            System.out.println(Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {
        ImplRunnableDemo runnable=new ImplRunnableDemo();
        new Thread(runnable).start();
    }
}
